package com.gitee.wsl.prism4j

import com.gitee.wsl.prism4j.annotations.PrismBundle
import kotlin.test.Test


@PrismBundle(includeAll = true, grammarLocatorClassName = ".GrammarLocatorToStringTest")
class ToStringTest {
    @Test
    fun test() {
        val locator: GrammarLocator = MyGrammarLocator()
        val prism4j: Prism4j = Prism4j(locator)

        var grammar: Prism4j.Grammar?

        for (language in locator.languages()) {
            grammar = prism4j.grammar(language)
            if (grammar != null) {
                println("language: $language, toString: ${ToString.toString(grammar)}%n",  )
            }
        }
    }
}
